package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;
import com.atguigu.jxc.entity.Unit;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface GoodsService {

    PageInfo<Goods> getIndexGoodsByPageAndCondition(String codeOrName, Integer goodsTypeId);

    ServiceVO getCode();

    List<Unit> getAllUnits();

    PageInfo<Goods> getGoodsByPageAndCondition(String goodsName, Integer goodsTypeId);

    void saveGoods(Goods goods);

    void updateGoodsById(Goods goods);

    boolean deleteGoodsById(Integer goodsId);

    PageInfo<Goods> getNoStockGoodsByPageAndCondition(String nameOrCode);

    PageInfo<Goods> getHasStockGoodsByPageAndCondition(String nameOrCode);

    void setInventoryQuantityAndPurchasingPrice(Integer goodsId, Integer inventoryQuantity, double purchasingPrice);

    boolean deleteStockById(Integer goodsId);
}
